package com.changhong.framework.sdfs.namenode.server.config;

/**
 * 实现配置
 * @author Summer
 */
public class DefaultNameNodeConfig implements NameNodeConfig{
    private final ConfigurationManager configurationManager=ConfigurationManager.getInstance();
    private final static String NAMESPACE="namenode.";

    @Override
    public int getCheckHeartbeatIntervalSeconds() {
        return configurationManager.getInteger(NAMESPACE+"heartbeat.interval.seconds","10");
    }

    @Override
    public int getDataNodeRenewMs() {
        return configurationManager.getInteger(NAMESPACE+"renewms","60000");
    }

    @Override
    public String getFlushDiskPath() {
        return configurationManager.getString(NAMESPACE+"flush.disk.path","E:\\tmp\\");
    }

    @Override
    public int getRpcServerPort() {
        return configurationManager.getInteger(NAMESPACE+"rpc.port","50070");
    }
}
